{include file="public/header" /}

<div class="page">
    <form id="user_form" enctype="multipart/form-data" method="post">
        <input type="hidden" name="member_id" value="{$member_array.member_id}" />
        <input type="hidden" name="old_member_avatar" value="{$member_array.member_avatar}" />
        <input type="hidden" name="member_name" value="{$member_array.member_name}" />
        <table class="ds-default-table">
            <tbody>
                <tr class="noborder">
                    <td class="required w120"><label>三三账号&手机号:</label></td>
                    <td class="vatop rowform">{$member_array.member_name}</td>
                    <td class="vatop tips"></td>
                </tr>

                <tr class="noborder">
                    <td class="required"><label for="member_password">三三密码:</label></td>
                    <td class="vatop rowform"><input type="text" id="member_password" name="member_password" class="txt"></td>
                    <td class="vatop tips">{$Think.lang.member_edit_password_keep}</td>
                </tr>

                <tr class="noborder">
                    <td class="required"><label class="member_qq">客户编码:</label></td>
                    {$member_array.member_client}
                    <td class="vatop rowform"><input type="text" value="{$member_array.member_client}" id="member_client" name="member_client" class="txt"></td>
                    <td class="vatop tips"></td>
                </tr>
                <tr class="noborder">
                        <td class="required"><label class="validation" >客户名称:</label></td>
                        <td class="vatop rowform"><input value="{$member_array.customer_name}" name="customer_name" value="" class="txt" type="text"></td>
                        <td class="vatop tips"></td>
                </tr>
                <tr class="noborder">
                        <td class="required"><label class="validation" >昵称:</label></td>
                        <td class="vatop rowform"><input  value="{$member_array.member_nickname}" name="member_nickname" value="" class="txt" type="text"></td>
                        <td class="vatop tips"></td>
                </tr>

                <tr class="noborder">
                      <td class="required"><label>区域:</label></td>
                      <td>
                        <input type="hidden" name="member_address" value="{$member_array.member_address}" id="member_address" >
                      </td>
                </tr>
                <tr class="noborder" >
                    <td class="w120"><label class="" for="">地址:</label></td>
                    <td class="vatop rowform"><textarea name="member_detail_address" rows="6" class="tarea" id="store_close_info">{$member_array.member_detail_address}</textarea></td>
                    <td class="vatop tips"></td>
                </tr>
                <tr class="noborder">
                 <td class="required"><label>客户类型:</label></td>
                 <td class="vatop">
                     <label>
                         <select name="enterprise_type" id="typeid" style="width: 222px;">
                             <option value="">请选择</option>
                             {foreach name="enterprisetype_info" item="cate"}
                             <option value="{$cate.id}" {if  ($cate.id == $member_array.enterprise_type) } selected {/if}>{$cate.name|default=''}</option>
                             {/foreach}
                         </select>
                     </label>
                 </td>
                 <td class="vatop tips"></td>
                 </tr>

                <tr class="noborder">
                    <td class="required"><label for="member_qq">建店年份:</label></td>
                    <td class="vatop rowform">
                        <input id="start_time" value="{$member_array.member_start_time}" name="start_time" type="text" class="text"/>
                    <td class="vatop tips"></td>
                </tr>

                <tr class="noborder">
                    <td class="required"><label for="member_qq">税号:</label></td>
                    <td class="vatop rowform"><input type="text" value="{$member_array.member_paragraph}"   id="member_paragraph" name="member_paragraph" class="txt"></td>
                    <td class="vatop tips"></td>
                </tr>
                <tr class="noborder">
                    <td class="required"><label for="member_qq">负责人:</label></td>
                    <td class="vatop rowform"><input type="text" value="{$member_array.member_person}" id="member_person" name="member_person" class="txt"></td>
                    <td class="vatop tips"></td>
                </tr>
                <tr class="noborder">
                    <td class="required"><label for="member_qq">负责人联系方式:</label></td>
                    <td class="vatop rowform"><input type="text" value="{$member_array.member_person_tel}" id="member_person_tel" name="member_person_tel" class="txt"></td>
                    <td class="vatop tips"></td>
                </tr>
                <tr class="noborder">
                    <td class="required"><label for="member_qq">联系人:</label></td>
                    <td class="vatop rowform"><input type="text" value="{$member_array.contact_name}" id="contact_name" name="contact_name" class="txt"></td>
                    <td class="vatop tips"></td>
                </tr>
                <tr class="noborder">
                    <td class="required"><label for="member_qq">联系人电话:</label></td>
                    <td class="vatop rowform"><input type="text" value="{$member_array.contact_phone}" id="contact_phone" name="contact_phone" class="txt"></td>
                    <td class="vatop tips"></td>
                </tr>
                
              
<!--                <tr class="noborder">-->
<!--                    <td class="required"><label for="member_paypwd">{$Think.lang.member_edit_paypwd}:</label></td>-->
<!--                    <td class="vatop rowform"><input type="text" id="member_paypwd" name="member_paypwd" class="txt"></td>-->
<!--                    <td class="vatop tips">{$Think.lang.member_edit_password_keep}</td>-->
<!--                </tr>-->
                <!-- <tr class="noborder">
                    <td class="required"><label class="validation" for="member_email">{$Think.lang.member_index_email}:</label></td>
                    <td class="vatop rowform"><input type="text" value="{$member_array.member_email}" id="member_email" name="member_email" class="txt"></td>
                    <td class="vatop tips">{$Think.lang.member_index_email}</td>
                </tr> -->
                <!-- <tr class="noborder">
                    <td class="required"><label for="member_truename">{$Think.lang.member_index_true_name}:</label></td>
                    <td class="vatop rowform"><input type="text" value="{$member_array.member_truename}" id="member_truename" name="member_truename" class="txt"></td>
                    <td class="vatop tips"></td>
                </tr> -->
                <tr class="noborder">
                    <td class="required"><label>{$Think.lang.member_edit_sex}:</label></td>
                    <td class="vatop rowform">
                        <label class="radio-label">
                            <i  class="radio-common {if $member_array.member_sex == 0}selected{/if}">
                                <input type="radio" value="0" name="member_sex" {if $member_array.member_sex == 0}checked="checked"{/if}>
                            </i>
                            <span>{$Think.lang.member_edit_secret}</span>
                        </label>
                        <label class="radio-label">
                            <i  class="radio-common {if $member_array.member_sex == 1}selected{/if}">
                                <input type="radio" value="1" name="member_sex" {if $member_array.member_sex == 1}checked="checked"{/if}>
                            </i>
                            <span>{$Think.lang.member_edit_male}</span>
                        </label>
                        <label class="radio-label">
                            <i  class="radio-common {if $member_array.member_sex == 2}selected{/if}">
                                <input type="radio" value="2" name="member_sex" {if $member_array.member_sex == 2}checked="checked"{/if}>
                            </i>
                            <span>{$Think.lang.member_edit_female}</span>
                        </label>
                    </td>
                    <td class="vatop tips"></td>
                </tr>
                <!-- <tr class="noborder">
                    <td class="required"><label class="member_areainfo">{$Think.lang.member_areainfo}1:</label></td>
                    <td class="vatop rowform"  colspan="2">
                        <span  class="w400">
                      <input type="hidden" value="{$member_array['member_provinceid']|default=''}" name="province_id" id="_area_1">
                      <input type="hidden" value="{$member_array['member_cityid']|default=''}" name="city_id" id="_area_2">
                      <input type="hidden" value="{$member_array['member_areaid']|default=''}" name="area_id" id="_area_3">
                      <input type="hidden" name="region" id="region" value="{$member_array.member_areainfo}"/>
                        </span>
                    </td>
                </tr> -->
                <!-- <tr class="noborder">
                    <td class="required"><label class="member_mobile">{$Think.lang.member_index_mobile}:</label></td>
                    <td class="vatop rowform"><input type="text" value="{$member_array.member_mobile}" id="member_mobile" name="member_mobile" class="txt"></td>
                    <td class="vatop tips"></td>
                </tr> -->
                <tr class="noborder">
                    <td class="required"><label class="member_qq">QQ:</label></td>
                    <td class="vatop rowform"><input type="text" value="{$member_array.member_qq}" id="member_qq" name="member_qq" class="txt"></td>
                    <td class="vatop tips"></td>
                </tr>
                <tr class="noborder">
                    <td class="required"><label for="member_qq">微信:</label></td>
                    <td class="vatop rowform"><input type="text" value="{$member_array.member_wx}"" id="member_wx" name="member_wx" class="txt"></td>
                    <td class="vatop tips"></td>
                </tr>
                <!-- <tr class="noborder">
                    <td class="required"><label class="member_ww">{$Think.lang.member_edit_wangwang}:</label></td>
                    <td class="vatop rowform"><input type="text" value="{$member_array.member_ww}" id="member_ww" name="member_ww" class="txt"></td>
                    <td class="vatop tips"></td>
                </tr> -->
                <tr class="noborder">
                    <td class="required"><label>企业认证:</label></td>
                    <td class="vatop rowform">
                        <label class="radio-label">
                            <i class="radio-common {if $member_array.enterprise_status != 2}selected{/if}">
                                <input type="radio" value="{if $member_array.member_auth_state == 3}0{else}{$member_array.member_auth_state}{/if}" name="member_auth_state" {if $member_array.member_auth_state != 3}checked="checked"{/if}>
                            </i>
                            <span>{$Think.lang.member_auth_state0}</span>
                        </label>
                        <label class="radio-label">
                            <i  class="radio-common {if $member_array.enterprise_status == 2}selected{/if}">
                                <input type="radio" value="2" name="member_auth_state" {if $member_array.member_auth_state == 3}checked="checked"{/if}>
                            </i>
                            <span>{$Think.lang.member_auth_state3}</span>
                        </label>
                    </td>
                    <td class="vatop tips"></td>
                </tr>
                <!-- <tr class="noborder">
                    <td class="required"><label>{$Think.lang.member_index_inform}:</label></td>
                    <td class="vatop rowform onoff">
                        <label for="inform_allow1" class="cb-enable {if $member_array.inform_allow == '1'}selected{/if}" ><span>{$Think.lang.member_edit_allow}</span></label>
                        <label for="inform_allow2" class="cb-disable {if $member_array.inform_allow == '2'}selected{/if}" ><span>{$Think.lang.member_edit_deny}</span></label>
                        <input id="inform_allow1" name="inform_allow" {if $member_array.inform_allow == '1'}checked="checked"{/if}  value="1" type="radio">
                        <input id="inform_allow2" name="inform_allow" {if $member_array.inform_allow == '2'}checked="checked"{/if} value="2" type="radio">
                    </td>
                    <td class="vatop tips"></td>
                </tr> -->
                <!-- <tr class="noborder">
                    <td class="required"><label>{$Think.lang.member_edit_allowbuy}:</label></td>
                    <td class="vatop rowform onoff">
                        <label for="isbuy_1" class="cb-enable {if $member_array.is_buylimit == '1'}selected{/if}" ><span>{$Think.lang.member_edit_allow}</span></label>
                        <label for="isbuy_2" class="cb-disable {if $member_array.is_buylimit == '0'}selected{/if}" ><span>{$Think.lang.member_edit_deny}</span></label>
                        <input id="isbuy_1" name="isbuy" {if $member_array.is_buylimit == '1'}checked="checked"{/if}  value="1" type="radio">
                        <input id="isbuy_2" name="isbuy" {if $member_array.is_buylimit == '0'}checked="checked"{/if} value="0" type="radio">
                    </td>
                    <td class="vatop tips">{$Think.lang.member_edit_allowbuy_tip}</td>
                </tr>
                <tr class="noborder">
                    <td class="required"><label>{$Think.lang.member_edit_allowtalk}:</label></td>
                    <td class="vatop rowform onoff">
                        <label for="allowtalk_1" class="cb-enable {if $member_array.is_allowtalk == '1'}selected{/if}" ><span>{$Think.lang.member_edit_allow}</span></label>
                        <label for="allowtalk_2" class="cb-disable {if $member_array.is_allowtalk == '0'}selected{/if}" ><span>{$Think.lang.member_edit_deny}</span></label>
                        <input id="allowtalk_1" name="allowtalk" {if $member_array.is_allowtalk == '1'}checked="checked"{/if}  value="1" type="radio">
                               <input id="allowtalk_2" name="allowtalk" {if $member_array.is_allowtalk == '0'}checked="checked"{/if} value="0" type="radio">
                    </td>
                    <td class="vatop tips">{$Think.lang.member_edit_allowtalk_tip}</td>
                </tr> -->
                <tr class="noborder">
                    <td class="required"><label>{$Think.lang.member_edit_allowlogin}:</label></td>
                    <td class="vatop rowform onoff">
                        <label for="memberstate_1" class="cb-enable {if $member_array.member_state == '1'}selected{/if}" ><span>{$Think.lang.member_edit_allow}</span></label>
                        <label for="memberstate_2" class="cb-disable {if $member_array.member_state == '0'}selected{/if}" ><span>{$Think.lang.member_edit_deny}</span></label>
                        <input id="memberstate_1" name="memberstate" {if $member_array.member_state == '1'}checked="checked"{/if}  value="1" type="radio">
                        <input id="memberstate_2" name="memberstate" {if $member_array.member_state == '0'}checked="checked"{/if}  value="0" type="radio">
                    </td>
                    <td class="vatop tips"></td>
                </tr>
<!--                <tr class="noborder">-->
<!--                    <td class="required"><label>{$Think.lang.member_mobilebind}:</label></td>-->
<!--                    <td class="vatop rowform onoff">-->
<!--                        <label for="membermobilebind_1" class="cb-enable {if $member_array.member_mobilebind == '1'}selected{/if}" ><span>{$Think.lang.ds_verified}</span></label>-->
<!--                        <label for="membermobilebind_2" class="cb-disable {if $member_array.member_mobilebind == '0'}selected{/if}" ><span>{$Think.lang.ds_unverified}</span></label>-->
<!--                        <input id="membermobilebind_1" name="membermobilebind" {if $member_array.member_mobilebind == '1'}checked="checked"{/if}  value="1" type="radio">-->
<!--                        <input id="membermobilebind_2" name="membermobilebind" {if $member_array.member_mobilebind == '0'}checked="checked"{/if} value="0" type="radio">-->
<!--                    </td>-->
<!--                    <td class="vatop tips"></td>-->
<!--                </tr>-->
                <!-- <tr class="noborder">
                    <td class="required"><label>{$Think.lang.member_emailbind}:</label></td>
                    <td class="vatop rowform onoff">
                        <label for="memberemailbind_1" class="cb-enable  {if $member_array.member_emailbind == '1'}selected{/if}" ><span>{$Think.lang.ds_verified}</span></label>
                        <label for="memberemailbind_2" class="cb-disable {if $member_array.member_emailbind == '0'}selected{/if}" ><span>{$Think.lang.ds_unverified}</span></label>
                        <input id="memberemailbind_1" name="memberemailbind" {if $member_array.member_emailbind == '1'}checked="checked"{/if} value="1" type="radio">
                        <input id="memberemailbind_2" name="memberemailbind" {if $member_array.member_emailbind == '0'}checked="checked"{/if} value="0" type="radio"></td>
                    <td class="vatop tips"></td>
                </tr> -->
                <tr class="noborder">
                    <td class="required"><label class="member_qq">积分:</label></td>
                    <td class="vatop rowform"><input type="text" value="{$member_array.member_points}" id="member_points" name="member_points" class="txt"></td>
                    <td class="vatop tips"></td>
                </tr>
                <tr class="noborder">
                    <td class="required w150"><label  for="member_name">运营商邀请码:</label></td>
                    <td class="vatop rowform"><input type="text"  name="operator_code" id="operator_code" class="txt">
                    <td class="vatop tips">如需修改上级运营商，请填写对应的运营商邀请码，为空则不修改</td>

                <tr class="noborder">
                    <td class="required w150"><label  >大客户邀请码:</label></td>
                    <td class="vatop rowform"><input type="text"  name="member_da_code" id="member_da_code" class="txt">
                    <td class="vatop tips">如需修改上级大客户，请填写对应的大客户邀请码，为空则不修改</td>
                <!-- <tr class="noborder">
                    <td class="required"><label>{$Think.lang.member_index_points}:</label></td>
                    <td class="vatop rowform">{$Think.lang.member_index_points}&nbsp;<strong class="red">{$member_array.member_points}</strong>&nbsp;{$Think.lang.points_unit}</td>
                    <td class="vatop tips"></td>
                </tr> -->
                <!-- <tr class="noborder">
                    <td class="required"><label>{$Think.lang.member_exppoints}:</label></td>
                    <td class="vatop rowform">{$Think.lang.member_exppoints}&nbsp;<strong class="red">{$member_array.member_exppoints}</strong>&nbsp;{$Think.lang.points_unit}</td>
                    <td class="vatop tips"></td>
                </tr>
                <tr class="noborder">
                    <td class="required"><label>{$Think.lang.member_index_available}{$Think.lang.member_index_prestore}:</label></td>
                    <td class="vatop rowform">{$Think.lang.member_index_available}&nbsp;<strong class="red">{$member_array.available_predeposit}</strong>&nbsp;{$Think.lang.currency_zh}</td>
                    <td class="vatop tips"></td>
                </tr>
                <tr class="noborder">
                    <td class="required"><label>{$Think.lang.member_index_frozen}{$Think.lang.member_index_prestore}:</label></td>
                    <td class="vatop rowform">{$Think.lang.member_index_frozen}&nbsp;<strong class="red">{$member_array.freeze_predeposit}</strong>&nbsp;{$Think.lang.currency_zh}</td>
                    <td class="vatop tips"></td>
                </tr> -->
            </tbody>
            <tfoot>
                <tr class="tfoot">
                    <td colspan="15"><input class="btn" style="line-height: 10px;" type="submit" value="{$Think.lang.ds_submit}"/></td>
                </tr>
            </tfoot>
        </table>
    </form>

    <script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/mlselection.js" charset="utf-8"></script>
    <link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/css/lightbox.min.css">
<script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/js/lightbox.min.js"></script>
<link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/js/jquery-ui-timepicker/jquery-ui-timepicker-addon.min.css">
<script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery-ui-timepicker/jquery-ui-timepicker-addon.min.js"></script>
<script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery-ui-timepicker/i18n/jquery-ui-timepicker-zh-CN.js"></script>
    <script type="text/javascript">
        $(function() {
                    $("#member_address").ds_region();
    $("#business_licence_address").ds_region();
    $("#bank_address").ds_region();
    $("#settlement_bank_address").ds_region();
    $('#start_time').datetimepicker({dateFormat: 'yy-mm-dd'});
        $('#end_time').datetimepicker({dateFormat: 'yy-mm-dd'});
            $("#region").ds_region();
            $('#user_form').validate({
                errorPlacement: function(error, element) {
                    error.appendTo(element.parent().parent().find('td:last'));
                },
                rules: {
                    member_password: {
                        maxlength: 20,
                        minlength: 6
                    },
                    member_client: {
                        required: true,
                    
                    },
                    member_person_tel: {
                        required: true,
                        minlength: 11,
                        maxlength: 11,
                        digits:true,
                    },
                    contact_phone: {
                        required: true,
                        minlength: 11,
                        maxlength: 11,
                        digits:true,
                    },
                    member_wx: {
                        digits: true,
                        minlength: 5,
                        maxlength: 11
                    },
                    member_qq: {
                        digits: true,
                        minlength: 5,
                        maxlength: 11
                    }
                },
                messages: {
                    member_password: {
                        maxlength: '{$Think.lang.member_edit_password_tip}',
                        minlength: '{$Think.lang.member_edit_password_tip}'
                    },
                    member_client: {
                        required: '客户编码不能为空',
                    
                    },
                    member_person_tel: {
                        required: '负责人联系方式不能为空',
                        maxlength: '请填写11位的手机号',
                        minlength: '请填写11位的手机号',
                        digits:"请填写正确的手机号码"
                    },
                    contact_phone: {
                        required: '联系人电话不能为空',
                        maxlength: '请填写11位的手机号',
                        minlength: '请填写11位的手机号',
                        digits:"请填写正确的手机号码"
                    },
                    member_qq: {
                        digits: '{$Think.lang.member_edit_qq_wrong}',
                        minlength: '{$Think.lang.member_edit_qq_wrong}',
                        maxlength: '{$Think.lang.member_edit_qq_wrong}'
                    },
                    member_wx: {
                        digits: '请输入正确的微信号',
                        minlength: '请输入正确的微信号',
                        maxlength: '请输入正确的微信号'
                    },
                }
            });
        });
    </script>
</div>
